﻿@page "/Helper"
@using WorkFlow.Data
@inject CommentTool commentTool
<h3>Helper</h3>
API Helper Page  http://localhost:8890/swagger/index.html
<div>
    <dr style="font-size: 1.5rem;">一、Start WorkFlow</dr>
    <br>
    <dr style="font-size: 1.3rem;"> way1:the parameter is dictionary (Post)</dr>
    <br>
    http://127.0.0.1:8890/api/WorkFlow/RunWorkFlow
    <br>
    <dr style="font-size: 1.3rem;"> way2:the parameter is string (Get)</dr>
    <br>
    http://localhost:8890/api/WorkFlow/RunWorkFlowByString?parameters={"WorkFlowName": "TestWorkFlow","User": "TestUser","OtherParameter1": "OtherParameter1","OtherParameter2": "OtherParameter2","OtherParameter3": "OtherParameter3"}
    <br>
    <dr style="font-size: 1.3rem;">  Required fields:(The next two fields is Required fields,other fields is saved in database for all step node)</dr>
    <br>
    <dr style="font-size: 1.3rem;">1.WorkFlowName(Need start workflow name)</dr>
    <br>
    <dr style="font-size: 1.3rem;">2.User(The person who start workflow)</dr>
</div>
<div>
    <dr style="font-size: 1.5rem;">二、Automation Step</dr>
    <br>
    The node is an automatic node,It mainly deals with things that don't need people's participation.
    <br>
    <dr style="font-size: 1.3rem;">step1.</dr>><dr>We can set the field "ThirdApiAddress" in  appsettings.json that using notify third api address </dr>
    <dr>The ThirdApi needs to use the get request method and needs have one parameter key named 'parameters'.for example(http://127.0.0.1:8891/api/TestApi/GetNotice?parameters={"WorkFlowName": "TestWorkFlow","User": "TestUser","Parameter1": "OtherParameter1","Parameter2": "OtherParameter2","Parameter3": "OtherParameter3"})</dr>
    (This API will receive the detailed ID of the node (WorkFlowDetailID) and the global parameters of all parameters in the Config In)
    <br>
    <dr style="font-size: 1.3rem;">step2.</dr>><dr>When workFlow notify thirdapi,we need deal our auutomatic node ,when doen,we need notify workflow by next api</dr>
    <br>
    <dr style="font-size: 1.3rem;"> way1:the parameter is dictionary (Post)</dr>
    http://127.0.0.1:8890/api/WorkFlow/TaskIsComplete
    <br>
    <dr style="font-size: 1.3rem;"> way2:the parameter is string (Get)</dr>
    <br>
    http://localhost:8890/api/WorkFlow/TaskIsComplete?parameters={"WorkFlowDetailID": "205","WorkFlowTaskResult": "1","OtherParameter1": "OtherParameter1"}
    <br>
    <dr style="font-size: 1.3rem;">  Required fields:(The next two fields is Required fields,other fields is saved in database for config Out)</dr>
    <br>
    <dr style="font-size: 1.3rem;">1.WorkFlowDetailID (come from workFlow Notify)</dr>
    <br>
    <dr style="font-size: 1.3rem;">2.WorkFlowTaskResult (We deal automatic node result ,It can use 1 or true)</dr>
    <br>
    <dr style="font-size: 1.3rem;"> Optional fields:</dr>
    <br>
    <dr style="font-size: 1.3rem;">1.User(The person who deal node)</dr>
    <br>
    <dr style="font-size: 1.3rem;">2.Message(Information to be displayed on the workflow page)</dr>

</div>
<div>
    <dr>三、</dr>
</div>
@code {
    protected override Task OnInitializedAsync()
    {
        commentTool.ShowNav = true;
        return base.OnInitializedAsync();
    }
}
